<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<SCRIPT>

window.onload=function(e){
	document.onclick = function(e){
		e=window.event||e;
		var t = e.target||e.srcElement  ;  //explorer = srcElement other=target 이벤트를 발생시킨 엘리먼트에 대한 참조를 가지고 있다. 
		t.parentNode.removeChild(t);
	};
}
</SCRIPT>
</head>
<body>
	<div> div1</div>
	<div>
		<ul>
			<li>li1</li>
			<li>li2</li>
			<li>li3</li>
			<li>li4</li>
			<li>li5</li>
		</ul>
	</div>
	
	<button>button1</button>
	<button>button2</button>
</body>
</html>